<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<title>Pagina 2</title>
	</head>
	<body>
		 <%
		 	float number1 = Float.parseFloat(request.getParameter("txtn1"));
		 	float number2 = Float.parseFloat(request.getParameter("txtn2"));
		 	float soma = number1+number2;
		 	String mensagem = "";
		 	
		 	if(number1==number2){
		 		mensagem = "Os numeros sao iguais";
		 	}else{
		 		
		 		if(number1>number2){
		 			mensagem = "O Numero "+number1+"  e maior";	
		 		}else{
		 			mensagem = "o Numero "+number2+"  e maior";
		 		}
		 	}
		 %>
		<table>
			<tbody>
				<tr>
					<td>
						<label>Numero 1</label>			
					</td>
					<td>
						<input value="<%=number1 %>" disabled="disabled" type="text" />
					</td>	
				</tr>
				<tr>
					<td>
						<label>Numero 2</label>			
					</td>
					<td>
						<input value="<%=number2%>" disabled="disabled" type="text" />
					</td>	
				</tr>
				<tr>
					<td>
						<label>Soma</label>			
					</td>
					<td>
						<input value="<%=soma%>" disabled="disabled" type="text" />
					</td>	
				</tr>
				<tr>
					<td colspan="2">
						<p><%=mensagem %></p>
					</td>
				</tr>
			</tbody>
		</table>
	</body>
</html>